<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD>
<TITLE>仓库参数设置</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css> 
{
	FONT-SIZE: 12px
}
.gridView {
	BORDER-RIGHT: #bad6ec 1px; BORDER-TOP: #bad6ec 1px; BORDER-LEFT: #bad6ec 1px; COLOR: #566984; BORDER-BOTTOM: #bad6ec 1px; FONT-FAMILY: Courier New
}
.gridViewHeader {
	BORDER-RIGHT: #bad6ec 1px solid; BORDER-TOP: #bad6ec 1px solid; BACKGROUND-IMAGE: url(images/bg_th.gif); BORDER-LEFT: #bad6ec 1px solid; LINE-HEIGHT: 27px; BORDER-BOTTOM: #bad6ec 1px solid
}
.gridViewItem {
	BORDER-RIGHT: #bad6ec 1px solid; BORDER-TOP: #bad6ec 1px solid; BORDER-LEFT: #bad6ec 1px solid; LINE-HEIGHT: 32px; BORDER-BOTTOM: #bad6ec 1px solid; TEXT-ALIGN: center
}
.cmdField {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BACKGROUND-IMAGE: url(images/bg_rectbtn.png); OVERFLOW: hidden; BORDER-LEFT: 0px; WIDTH: 67px; COLOR: #364c6d; LINE-HEIGHT: 27px; BORDER-BOTTOM: 0px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 27px; BACKGROUND-COLOR: transparent; TEXT-DECORATION: none
}
.buttonBlue {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BACKGROUND-IMAGE: url(images/bg_button_blue.gif); BORDER-LEFT: 0px; WIDTH: 78px; COLOR: white; BORDER-BOTTOM: 0px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 21px
}
</STYLE>
<META content="MSHTML 6.00.2900.5848" name=GENERATOR>
<script type="text/javascript">
	function display(id){
	    var traget=document.getElementById(id);
	    traget.style.display="";
	}
	function hideLayer(id){
		var traget=document.getElementById(id);
		traget.style.display="none";
	}
</script>
</HEAD>
<BODY 
style="BACKGROUND-POSITION-Y: -120px; BACKGROUND-IMAGE: url(images/bg.gif); BACKGROUND-REPEAT: repeat-x">

<DIV>
  <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
      <TR 
  style="BACKGROUND-IMAGE: url(images/bg_header.gif); BACKGROUND-REPEAT: repeat-x" 
  height=47>
        <TD width=10><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(images/main_hl.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(images/main_hl2.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN><SPAN 
      style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FLOAT: left; BACKGROUND-IMAGE: url(images/main_hb.gif); PADDING-BOTTOM: 10px; COLOR: white; PADDING-TOP: 10px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 47px; TEXT-ALIGN: center; 0px: ">生产线参数设置</SPAN><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(images/main_hr.gif); WIDTH: 60px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD 
    style="BACKGROUND-POSITION: 50% bottom; BACKGROUND-IMAGE: url(images/main_rc.gif)" 
    width=10></TD>
      </TR>
      <TR>
        <TD style="BACKGROUND-IMAGE: url(images/main_ls.gif)">&nbsp;</TD>
        <TD 
    style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; COLOR: #566984; PADDING-TOP: 10px; BACKGROUND-COLOR: white" 
    vAlign=top align="center">
          <DIV>
          
            <TABLE class=gridView id=ctl00_ContentPlaceHolder2_GridView1 
      style="WIDTH:90%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all 
      border=1>
      
              <TBODY>
                <TR>
                  <TH class=gridViewHeader scope=col>Id</TH>
                  <TH class=gridViewHeader scope=col>产品</TH>
                  <TH class=gridViewHeader scope=col>生产线名字</TH>
                  <TH class=gridViewHeader scope=col>生产线租价</TH>
                  <TH class=gridViewHeader scope=col>生产线买价</TH>
                  <TH class=gridViewHeader scope=col>生产线产能</TH>
                  <TH class=gridViewHeader scope=col>扩能投资</TH>
                  <TH class=gridViewHeader scope=col>扩能容量</TH>
                  <TH class=gridViewHeader scope=col></TH>
                </TR>
                
                <s:iterator value="#request.listLine" var="list" status="li" >
                <s:form name="f%{#li.count}" method="post" theme="simple" onsubmit="return false;">
               <TR>
                  <s:hidden name="line.lineId" value="%{#list.lineId}"/>
                  <s:hidden name="line.product.productId" value="%{#list.product.productId}"/>
                  <TD class=gridViewItem ><s:label value="%{#li.count}" theme="simple"/></TD>
                  <TD class=gridViewItem ><s:textfield disabled="true" name="line.product.productName" size="6" value="%{#list.product.productName}" theme="simple"/>
                  	<s:hidden name="line.product.productName" value="%{#list.product.productName}"></s:hidden>
                  </TD>
                  <TD class=gridViewItem ><s:textfield disabled="true" name="line.lineName" size="6" value="%{#list.lineName}" theme="simple"/>
                  	<s:hidden name="line.lineName" value="%{#list.lineName}"></s:hidden>
                  </TD>
                  <TD class=gridViewItem ><s:textfield name="line.lineRentPrice" size="6" value="%{#list.lineRentPrice}" theme="simple"/></TD>
                  <TD class=gridViewItem ><s:textfield name="line.lineBuyPrice" size="6" value="%{#list.lineBuyPrice}" theme="simple"/></TD>
                  <TD class=gridViewItem ><s:textfield name="line.lineCapacity" size="6" value="%{#list.lineCapacity}" theme="simple"/></TD>
                  <TD class=gridViewItem ><s:textfield name="line.largePrice" size="6" value="%{#list.largePrice}" theme="simple"/></TD>
                  <TD class=gridViewItem ><s:textfield name="line.largeCapacity" size="6" value="%{#list.largeCapacity}" theme="simple"/></TD>
                  <TD class=gridViewItem ><s:submit type="button" onclick="javascript:document.f%{#li.count}.action='lineAction!updateLine';document.f%{#li.count}.submit()" value="更新"/>
                  <s:submit type="button" onclick="javascript:document.f%{#li.count}.action='lineAction!deleteLine';document.f%{#li.count}.submit()" value="删除"/></TD>
                </TR>
                </s:form>
                </s:iterator>
                
                <TR id="add_layer" style="display: none;">
               	  <s:form name="f"  method="post" theme="simple" onsubmit="return false;">
                   <TD class=gridViewItem ><s:property value="#request.listLine.size+1"/></TD>
                   <TD class=gridViewItem >
                   	   <s:select list="#request.listProduct" name="line.product.productId" listKey="productId" listValue="productName" cssClass="gridViewItem"></s:select>
                   </TD>
                   <TD class=gridViewItem ><input type="text" name="line.lineName" size="6" /></TD>
                   <TD class=gridViewItem ><input type="text" name="line.lineRentPrice" size="6" /></TD>
                   <TD class=gridViewItem ><input type="text" name="line.lineBuyPrice" size="6" /></TD>
                   <TD class=gridViewItem ><input type="text" name="line.lineCapacity" size="6"/></TD>
                   <TD class=gridViewItem ><input type="text" name="line.largePrice" size="6"/></TD>
                   <TD class=gridViewItem ><input type="text" name="line.largeCapacity" size="6"/></TD>
                   <TD class=gridViewItem>
                   <s:submit type="button" onclick="javascript:document.f.action='lineAction!addLine';document.f.submit()" value="添加" theme="simple"/>
            	   <input type="button" onclick="hideLayer('add_layer');"   value="删除"/>
                   </TD>
                  </s:form>  
                </TR>
                
                
              </TBODY>
            </TABLE>
          </DIV>
          <div style="margin-top:20px; width:80%" align="right"><input type="button" onclick="display('add_layer');" value="添加"/></div>
        </TD>
        <TD style="BACKGROUND-IMAGE: url(images/main_rs.gif)"></TD>
      </TR>
      <TR 
  style="BACKGROUND-IMAGE: url(images/main_fs.gif); BACKGROUND-REPEAT: repeat-x" 
  height=10>
        <TD style="BACKGROUND-IMAGE: url(images/main_lf.gif)"></TD>
        <TD style="BACKGROUND-IMAGE: url(images/main_fs.gif)"></TD>
        <TD 
style="BACKGROUND-IMAGE: url(images/main_rf.gif)"></TD>
      </TR>
    </TBODY>
  </TABLE>
</DIV>
</BODY>

</html>
